-
Notifications
You must be signed in to change notification settings - Fork 727
Add integration test for restore of file-based programs #8470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Depending on what you are debugging that may be expected or not. If you are debugging the extension code running in the tests, there should be source maps which let you step through the typescript. But if you're debugging VSCode itself, unfortunately thats what we have without a lot more setup. |
…b.com/dotnet/vscode-csharp into dev/rigibson/integration-test-restore
|
@dibarbet pointed out the integration test may be failing because the waiter needs to be explicitly enabled in this context. The test does pass locally, but, maybe lack of the env var was causing a problem in CI. We will find out. It looks like it would also be an option to add a command line argument to LanguageServer and call |
|
This is the problem This probably means an SDK update is needed. |
…ation-test-restore
|
|
||
| const doRunSuite = process.env.RoslynSkipTestFileBasedPrograms !== 'true'; | ||
| console.log(`process.env.RoslynSkipTestFileBasedPrograms: ${process.env.RoslynSkipTestFileBasedPrograms}`); | ||
| const doRunSuite = process.env['ROSLYN_SKIP_TEST_FILE_BASED_PROGRAMS'] !== 'true'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System and user-defined variables (except secret variables) also get injected as environment variables for your platform. When variables convert into environment variables, variable names become uppercase, and periods turn into underscores. For example, the variable name any.variable becomes the variable name $ANY_VARIABLE.
Linux env vars are case sensitive, so, the env. lookup is case sensitive. Since we were not using an uppercase name to access the env var, we weren't seeing it in the test.
Figuring this out took an unreasonable amount of time.
Maybe the remaining failing legs are using too old of an SDK? They may need to also have the env var added. |
|
@JoeRobich @dibarbet This is ready for review |
|
|
||
| const doRunSuite = process.env['ROSLYN_SKIP_TEST_FILE_BASED_PROGRAMS'] !== 'true'; | ||
| console.log(`process.env.ROSLYN_SKIP_TEST_FILE_BASED_PROGRAMS: ${process.env.ROSLYN_SKIP_TEST_FILE_BASED_PROGRAMS}`); | ||
| console.log(`doRunSuite: ${doRunSuite}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider extracting all this to a helper function similar to
| export const describeIfCSharp = describeIf(!usingDevKit()); |
| let exports: CSharpExtensionExports; | ||
|
|
||
| beforeAll(async () => { | ||
| process.env.RoslynWaiterEnabled = 'true'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking it would be reasonable to set this for all Roslyn integration test runs, even if we don't use it yet.
e.g.
| process.env.RUNNING_INTEGRATION_TESTS = 'true'; |
I can look at that in a followup though myself.
test/lsptoolshost/integrationTests/fileBasedPrograms.integration.test.ts
Outdated
Show resolved
Hide resolved
| displayName: Test Windows | ||
| dependsOn: [] | ||
| variables: | ||
| ROSLYN_SKIP_TEST_FILE_BASED_PROGRAMS: 'true' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume we can enable the tests for windows/mac when we upgrade them to running on .NET 10?
| @@ -0,0 +1,4 @@ | |||
|
|
|||
| using Newton; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of having this be in the file by default, should we insert it during the test? That way we can re-use the same base test file if we need to for other tests?

Depends on changes in dotnet/roslyn#79669